/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ie.tcd.cs.railtickets.server.domain;

import java.util.Date;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author Wenbo Sun
 */
@Entity
@DiscriminatorValue("ROUTE")
public class RouteTime extends TimeTable {

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "route_id")
    private Route route;

    public RouteTime() {
    }

    public RouteTime(long id) {
        super(id);
    }

    public RouteTime(Date startTime, double travelPeriod, Route route) {
        super(startTime, travelPeriod);
        this.route = route;
    }

    
    public Route getRoute() {
        return route;
    }

    public void setRoute(Route route) {
        this.route = route;
    }


}
